/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author alphyon
 */
@Entity
@Table(name = "componentes_pc")
@NamedQueries({@NamedQuery(name = "ComponentesPc.findAll", query = "SELECT c FROM ComponentesPc c"), @NamedQuery(name = "ComponentesPc.findById", query = "SELECT c FROM ComponentesPc c WHERE c.id = :id"), @NamedQuery(name = "ComponentesPc.findByIdPc", query = "SELECT c FROM ComponentesPc c WHERE c.idPc = :idPc"), @NamedQuery(name = "ComponentesPc.findByIdComponente", query = "SELECT c FROM ComponentesPc c WHERE c.idComponente = :idComponente")})
public class ComponentesPc implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "id_pc")
    private String idPc;
    @Basic(optional = false)
    @Column(name = "id_componente")
    private String idComponente;

    public ComponentesPc() {
    }

    public ComponentesPc(Integer id) {
        this.id = id;
    }

    public ComponentesPc(Integer id, String idPc, String idComponente) {
        this.id = id;
        this.idPc = idPc;
        this.idComponente = idComponente;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIdPc() {
        return idPc;
    }

    public void setIdPc(String idPc) {
        this.idPc = idPc;
    }

    public String getIdComponente() {
        return idComponente;
    }

    public void setIdComponente(String idComponente) {
        this.idComponente = idComponente;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ComponentesPc)) {
            return false;
        }
        ComponentesPc other = (ComponentesPc) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entidades.ComponentesPc[id=" + id + "]";
    }

}
